<include file="public:top" />
<!--编辑菜单-->
<fieldset class="layui-elem-field layui-field-title">
    <legend>添加帖子</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="" style="padding:20px;">

	<input type="hidden" value="{$menuid}" name="menuid">
	<div class="layui-form-item">
      <label class="layui-form-label">标题</label>
      <div class="layui-input-block">
        <input type="text" name="title" id="J_title" required lay-verify="required" placeholder="必填内容" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item">
    <label class="layui-form-label">所在板块</label>
    <div class="layui-input-block">
      <select name="cateid">
        <option value="">请选择</option>
    		<volist name="catelist" id="val" >
    			<option value="{$val.id}" <if condition="$pid eq $val['id']"> selected=""</if>>{$val.name}</option>
    		</volist>
	   </select>
    </div>
  </div>
 
    <div class="layui-form-item layui-form-text">
      <label class="layui-form-label">内容</label>
      <div class="layui-input-block">
        <textarea class="layui-textarea" name='content' id="content" ></textarea>
      </div>
    </div>

    <div class="layui-form-item" pane>
    <label class="layui-form-label">置顶</label>
    <div class="layui-input-block">
      <input type="radio" name="top" value="1" title="{:L('yes')}">
      <input type="radio" name="top" value="0" title="{:L('no')}" checked="">
    </div>
  </div>

    <div class="layui-form-item" pane>
    <label class="layui-form-label">{:L('enabled')}</label>
    <div class="layui-input-block">
      <input type="radio" name="status" value="1" title="{:L('yes')}" checked="">
      <input type="radio" name="status" value="0" title="{:L('no')}">
    </div>
  </div>

  <div class="layui-form-item">
        <button class="layui-btn" lay-submit="" lay-filter="content_edit">立即提交</button>
        <button class="layui-btn layui-btn-primary" onClick="history.go(-1)">返回</button>
  </div>

</form>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
layui.use(['layer','jquery','form','element','layedit'], function () {

	 //参数：layui、名称、更新的formid、更新的url：module/method、更新后跳转的url（为空则不跳转）、编辑器id、标签id（为空则不获取）
    Oper.initUpdate(layui, '帖子', 'content_edit', 'forum/add', 'forum/index', ['content'], '#tpt_btn');
});
</script>
</body>
</html>